package com.shxy.controller.ui;

import lombok.Data;

import java.util.List;

/**
 * 自定义分页
 * @param <T>
 */
@Data
public class Pageable<T> {
    private long total;
    private int page = 1;
    private int size = 10;
    private List<T> items;

    public Pageable() {}

    public Pageable(long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public Pageable(long total, List<T> items, int page, int size) {
        this.total = total;
        this.items = items;
        this.page = page;
        this.size = size;
    }
}